<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'departmentAdjustment.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" href="common/css/style.css" type="text/css"></link>
	
	<script src="common/js/jquery-1.5.2.min.js"></script>
	<script src="common/js/common.js"></script>

	<script type="text/javascript">
		$(document).ready(function(){
			$("#newTotal").keyup(function(){
				onlyEnterNumbers($(this));
				var total = $(this).val();
				var price = $("#price").val();
				var amount = Number(total) * Number(price);
				$("#amount").text(amount);
			});
			
			$("#price").keyup(function(){
				numbersAndPoint($(this));
				var total = $("#newTotal").val();
				var price = $(this).val();
				var amount = Number(total) * Number(price);
				$("#amount").text(amount);
			});
		})
	</script>
  </head>
  
  <body>
  	<table align="center">
  		<tr>
  			<td><jsp:include page="head.jsp"></jsp:include></td>
  		</tr>
    	<tr>
    		<td>
	    		<span id="powerBtn" onclick="javascript:cutover('power','千瓦时');">
	    			用电量
	    		</span>&nbsp;&nbsp;
	    		<span id="waterBtn" onclick="javascript:cutover('water','立方米');">
	    			用水量
	    		</span>
    		</td>
    	</tr>
    	<tr>
    		<td>
				<form id="totalAdjustmentForm" action="" method="post">
					<table>
						<tr>
							<td>
								上次总量：<span class="underline">412412421</span>
								<span class="dw">千瓦时</span>
							</td>
							<td>
								累计用量：<span class="underline">4214123</span>
								<span class="dw">千瓦时</span>
							</td>
							<td>
								累计用量占比：<span class="underline">90%</span>
							</td>
							<td>
								时间占比：<span class="underline">80%</span>
							</td>
						</tr>
						<tr>
							<td>
								设定新总量：<input id="newTotal" name="newTotal" size="10px;"/>
								<span class="dw">千瓦时</span>
							</td>
							<td>
								单&nbsp;&nbsp;价：<input id="price" name="price" size="8px;"/>
								元/<span class="dw">千瓦时</span>
							</td>
							<td>
								金额：<span id="amount" class="underline">0</span>&nbsp;万元
							</td>
							<td>&nbsp;</td>
						</tr>
						<tr>
							<td>
								<input type="submit" value="确定"/>
								<input type="reset" value="取消"/>
							</td>
							<td>&nbsp;</td>
							<td>&nbsp;</td>
							<td>&nbsp;</td>
						</tr>
					</table>
					<input id="showtype" name="showtype" type="hidden"/>
				</form>
				<p>&nbsp;</p>
			</td>
		</tr>
		<tr>
			<td>
				<table class="table">
					<tr>
						<td>部门名称 </td>
						<td>累计用量(<span class="dw">千瓦时</span>)</td>
						<td>累计用量占比 </td>
						<td>所用时间占比 </td>
						<td>剩余用量(<span class="dw">千瓦时</span>)</td>
						<td>计划总量(<span class="dw">千瓦时</span>)</td>
					</tr>
					<tr>
						<td>部门AAA</td>
						<td>12345</td>
						<td>89%</td>
						<td>85%</td>
						<td>3231</td>
						<td>15576</td>
					</tr>
					<tr>
						<td>部门BBB</td>
						<td>1000</td>
						<td>92%</td>
						<td>95%</td>
						<td>250</td>
						<td>1250</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<p>&nbsp;</p>调整日志：
				<table id="adjustmentLog" class="table">
					<tr>
						<td>序号 </td>
						<td>调整日期</td>
						<td>调整后总量(<span class="dw">千瓦时</span>)</td>
						<td>操作人</td>
					</tr>
					<tr>
						<td>1</td>
						<td>2011-06-12</td>
						<td>12345</td>
						<td>yangyunzi</td>
					</tr>
					<tr>
						<td>2</td>
						<td>2011-06-13</td>
						<td>45678</td>
						<td>yangyunzi</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
  </body>
</html>
